import Vue from 'vue';
import Router from 'vue-router';
import me from '@/pages/me';
import order from '@/pages/order';
import home from '@/pages/home';
import commodity from '@/commodity/commodity';
import commoditydetails from '@/commodity/commoditydetails';
import login from '@/login/login';
import forgetpassword from '@/login/forgetpassword';
import register from '@/login/register';
import verification from '@/login/registerVerification';
import address from '@/personalcore/address';
import newaddress from '@/personalcore/newaddress';
import newpassword from '@/personalcore/newpassword';
import forget from '@/personalcore/forgetpassword';
import setpassword from '@/personalcore/setpassword';
import myisorder from '@/personalcore/myisorder';
import myorder from '@/personalcore/myorder';
import invitation from '@/personalcore/invitation';
import setuserinfo from '@/personalcore/setuserinfo';
import about from '@/personalcore/about';
import enter from '@/homepages/enter';
import turnout from '@/homepages/turnout';
import integral from '@/homepages/integral';
import balance from '@/homepages/balance';
import meintegral from '@/homepages/meintegral';
import bill from '@/homepages/bill';
import outrecord from '@/homepages/outrecord'
import exchange from '@/homepages/exchange'
import photo from '@/personalcore/photo'
import edit from '@/personalcore/addressedit'
import scan from '@/homepages/scan'
import usersign from '@/homepages/usersign'
import sginquery from '@/personalcore/sginquery'
import inviterregister from '@/login/inviterregister'
import invitationuser from '@/homepages/invitationuser'
import mebonus from '@/homepages/mebonus'
import guang from '@/homepages/guanggao'
import crop from '@/personalcore/crop'

Vue.use(Router)

export default new Router({
    routes: [
        {
            path: '/',
            redirect: '/login',
            meta: {
                keepAlive: false
            }
        },
        {
            path: '/guang',
            name: 'guang',
            component: guang,
            meta: {
                keepAlive: false
            }
        },
        {
            path: '/mebonus',
            name: 'mebonus',
            component: mebonus,
            meta: {
                keepAlive: false
            }
        },
        {
            path: '/invitationuser',
            name: 'invitationuser',
            component: invitationuser,
            meta: {
                keepAlive: false
            }
        },
        {
            path: '/setuserinfo',
            name: 'setuserinfo',
            component: setuserinfo,
            meta: {
                keepAlive: false
            }
        },
        {
            path: '/inviterregister',
            name: 'inviterregister',
            component: inviterregister,
            meta: {
                keepAlive: false
            }
        },
        {
            path: '/sginquery',
            name: 'sginquery',
            component: sginquery,
            meta: {
                keepAlive: false
            }
        },
        {
            path: '/photo',
            name: 'photo',
            component: photo,
            meta: {
                keepAlive: false
            }
        },
        {
            path: '/usersign',
            name: 'usersign',
            component: usersign,
            meta: {
                keepAlive: false
            }
        },
        {
            path: '/edit',
            name: 'edit',
            component: edit,
            meta: {
                keepAlive: false
            }
        },
        {
            path: '/exchange',
            name: 'exchange',
            component: exchange,
            meta: {
                keepAlive: false
            }
        },
        {
            path: '/bill',
            name: 'bill',
            component: bill,
            meta: {
                keepAlive: false
            }
        },
        {
            path: '/outrecord',
            name: 'outrecord',
            component: outrecord,
            meta: {
                keepAlive: false
            }
        },
        {
            path: '/myisorder',
            name: 'myisorder',
            component: myisorder,
            meta: {
                keepAlive: false
            }
        },
        {
            path: '/meintegral',
            name: 'meintegral',
            component: meintegral,
            meta: {
                keepAlive: false
            }
        },
        {
            path: '/balance',
            name: 'balance',
            component: balance,
            meta: {
                keepAlive: false
            }
        },
        {
            path: '/integral',
            name: 'integral',
            component: integral,
            meta: {
                keepAlive: false
            }
        },
        {
            path: '/turnout',
            name: 'turnout',
            component: turnout,
            meta: {
                keepAlive: false
            }
        },
        {
            path: '/enter',
            name: 'enter',
            component: enter,
            meta: {
                keepAlive: false
            }
        },
        {
            path: '/about',
            name: 'about',
            component: about,
            meta: {
                keepAlive: false
            }
        },
        {
            path: '/myorder',
            name: 'myorder',
            component: myorder,
            meta: {
                keepAlive: false
            }
        },
        {
            path: '/invitation',
            name: 'invitation',
            component: invitation,
            meta: {
                keepAlive: false
            }
        },
        {
            path: '/setpassword',
            name: 'setpassword',
            component: setpassword,
            meta: {
                keepAlive: false
            }
        },
        {
            path: '/forget',
            name: 'forget',
            component: forget,
            meta: {
                keepAlive: false
            }
        },
        {
            path: '/newpassword',
            name: 'newpassword',
            component: newpassword,
            meta: {
                keepAlive: false
            }
        },
        {
            path: '/newaddress',
            name: 'newaddress',
            component: newaddress,
            meta: {
                keepAlive: false
            }
        },
        {
            path: '/verification',
            name: 'verification',
            component: verification,
            meta: {
                keepAlive: false
            }
        },
        {
            path: '/home',
            name: 'home',
            component: home,
            meta: {
                keepAlive: false
            }
        },

        {
            path: '/register',
            name: 'register',
            component: register,
            meta: {
                keepAlive: false
            }
        },
        {
            path: '/address',
            name: 'address',
            component: address,
            meta: {
                keepAlive: false
            }
        },
        {
            path: '/login',
            name: 'login',
            component: login,
            meta: {
                keepAlive: false
            }
        },
        {
            path: '/forgetpassword',
            name: 'forgetpassword',
            component: forgetpassword,
            meta: {
                keepAlive: false
            }
        },
        {
            path: '/commoditydetails',
            name: 'commoditydetails',
            component: commoditydetails,
            meta: {
                keepAlive: true
            }
        },
        {
            path: '/commodity/:id/:title',
            name: 'commodity',
            component: commodity,
            meta: {
                keepAlive: true
            }
        },
        {
            path: '/me',
            name: 'me',
            component: me,
            meta: {
                keepAlive: false
            }
        },
        {
            path: '/order',
            name: 'order',
            component: order,
            meta: {
                keepAlive: true
            }
        },
        {
            path: '/order?mui=1',
            name: 'order',
            component: order,
            meta: {
                keepAlive: true
            }
        },
        {
            path: '/scan',
            name: 'scan',
            component: scan,
            meta: {
                keepAlive: false
            }
        },
        {
            path: '/crop',
            name: 'crop',
            component: crop
        }
    ]
})
